home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
401-425
/
401
/
crclists
/
genscript.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-14
|
750b
|
37 lines
/*
* This simple little program generates a script suitable for
* running by the CLI "execute" command, to create crclists
* for any range of disks in the AmigaLibDisk set.
*
* Typical use is:
*
* GenScript >ram:j 100 150
* Execute ram:j
*/
#include <stdio.h>
#define FMT1 "find >find.out AmigaLibDisk%d: -type f -print\n"
#define FMT2 "brik >Disk%03.3d.crc -Gbf find.out\n"
#define FMT3 "brik -C Disk%03.3d.crc\n"
main (argc, argv)
int argc;
char *argv[];
{
int start, stop;
if (argc != 3) {
printf ("usage: genscript startnumber stopnumber\n");
} else {
start = atoi (argv[1]);
stop = atoi (argv[2]);
while (start <= stop) {
printf (FMT1, start);
printf (FMT2, start);
printf (FMT3, start);
start++;
}
}
}